/**
 * 
 */
package fr.kptn.musixmatchwrapper.dto.track.matcher.get;

import com.google.gson.annotations.SerializedName;

import fr.kptn.musixmatchwrapper.dto.IResponse;
import fr.kptn.musixmatchwrapper.dto.ResponseHeader;

/**
 * The entire response of a match track API call
 * 
 * @author Sylvain
 * 
 */
public class TrackMatcherGetResponse implements IResponse {

	/** The message part of the response **/
	@SerializedName("message")
	private TrackMatcherGetResponseContainer mContainer;

	/**
	 * @return the container
	 */
	public TrackMatcherGetResponseContainer getContainer() {
		return mContainer;
	}

	/**
	 * @param pContainer
	 *            the container to set
	 */
	public void setContainer(TrackMatcherGetResponseContainer pContainer) {
		mContainer = pContainer;
	}

	/* (non-Javadoc)
	 * @see fr.kptn.musixmatchwrapper.dto.IResponse#getHeader()
	 */
	@Override
	public ResponseHeader getHeader() {
		if (mContainer != null) {
			return mContainer.getHeader();
		}
		return null;
	}

	/* (non-Javadoc)
	 * @see fr.kptn.musixmatchwrapper.dto.IResponse#getData()
	 */
	@Override
	public Object getData() {
		if (mContainer != null) {
			return mContainer.getBody().getTrack();
		}
		return null;
	}
}
